package util;

import com.medpro.testengine.core.CommandsList;

import static util.Pattern.login;

/**
 * Created by petrova on 19.6.14.
 */
public class SignInPortlet {

    CommandsList command;
    Validation validation;

    public SignInPortlet(CommandsList commander) {
        command = commander;
        validation = new Validation(commander);
    }

    public SignInPortlet signInARC(String url, String password, String email) {

        command.open(url)
                .click("button.LogIn");
        login(command, email, password);
        command.click("ARC.select")
        ;
        return this;
    }

    public SignInPortlet chekInvateMessage() {

        command.verifyElementPresent("msg.policies")
                .verifyElementPresent("msg.clickHere")
                .click("msg.clickHere");
        return this;
    }
}
